package com.example.demo.handler

import com.example.demo.model.*
import org.springframework.stereotype.Component
import xyz.erupt.annotation.`fun`.*
import xyz.erupt.core.exception.*
import xyz.erupt.core.view.*
import javax.annotation.*
import javax.servlet.http.*


@Component
class OperationHandlerImpl : OperationHandler<Complex?, ComplexOperator?> {
    @Resource //展示自动注入功能
    lateinit var request: HttpServletRequest

    override fun exec(data: List<Complex?>?, complexOperator: ComplexOperator?, param: Array<String>): String? {
        throw EruptApiErrorTip(
            EruptApiModel(
                EruptApiModel.Status.WARNING,
                "自定义报错提示：" + request.servletPath, EruptApiModel.PromptWay.NOTIFY
            )
        )
    }
}